<?php


namespace app\logic\index\style;


use app\logic\BaseLogic;
use plugin\admin\app\model\style\OverseaStyle;
use support\Request;

class OverseaStyleLogic extends BaseLogic
{
    protected $model;

    public function __construct()
    {
        parent::__construct();

        $this->model = OverseaStyle::getInstance();
    }

    public static function getInstance()
    {
        return new self();
    }

    public function getList()
    {
        $where = [
            ['isdel', '=', 0],
            ['status', '=', 1]
        ];
        $fields = ['type', 'name', 'image', 'video', 'avatar', 'nickname'];
        return $this->model->getWhere($where)->orderBy('sort', 'DESC')->select($fields)->get()->toArray();
    }
}